﻿@{
    ViewBag.Title = "Form";
    Layout = "~/Views/Shared/_ManufactureList.cshtml";
}
<script>
    $(function () {
        initControl();
        gridList();
    });
    function initControl() {
        $('select').bindSelect();
    }
    function gridList() {
        var $gridList = $("#gridList");
        $gridList.dataGrid({
            //url: "/SystemManage/User/GetGridJson",
            height: $(window).height() - 225,
            colModel: [
                { label: '序号', name: '', width: 80, align: 'center' },
                { label: '零件编号', name: '', width: 80, align: 'center' },
                { label: '下料方式', name: '', width: 80, align: 'center' },
                { label: '剪切图形', name: '', width: 80, align: 'center' },
                { label: '材料牌号', name: '', width: 80, align: 'center' },
                { label: '材料规格', name: '', width: 80, align: 'center' },
                { label: '开卷尺寸', name: '', width: 80, align: 'center' },
                { label: '一张几块', name: '', width: 80, align: 'center' },
                { label: '一块几件', name: '', width: 80, align: 'center' },
                { label: '一张几件', name: '', width: 80, align: 'center' },
                { label: '毛坯类型', name: '', width: 80, align: 'center' },
                { label: '毛坯尺寸', name: '', width: 80, align: 'center' },
                { label: '宽度公差(mm)', name: '', width: 80, align: 'center' },
                { label: '长度公差(mm)', name: '', width: 80, align: 'center' },
                { label: '标准编号', name: '', width: 80, align: 'center' },
                { label: '特殊要求', name: '', width: 80, align: 'center' },
                { label: '合件编号', name: '', width: 80, align: 'center' },
                { label: '备注', name: '', width: 80, align: 'center' },
                { label: '操作人员', name: '', width: 80, align: 'center' },
                { label: '输入日期', name: '', width: 80, align: 'center' },
                { label: '输入时间', name: '', width: 80, align: 'center' }
            ],
            pager: "#gridPager",
            sortname: 'F_DepartmentId asc,F_CreatorTime desc',
            viewrecords: true
        });
        $("#btn_search").click(function () {
            $gridList.jqGrid('setGridParam', {
                postData: { keyword: $("#txt_keyword").val() },
            }).trigger('reloadGrid');
        });
    }
    function btn_add() {
        $.detailOpen({
            id: "Detail",
            title: "",
            url: "/BOM/Manufacture/ShearingBlankingInput"
        });
    }
    function btn_show() {
        $.detailOpen({
            id: "Detail",
            title: "",
            url: "/BOM/Manufacture/ShearingBlankingShow"
        });
    }
    function btn_ok() {
        parent.$.detailClose();
    }
    function btn_cancel() {
        parent.$.detailClose();
    }
</script>
<div id="layout" style="height: 100%; width: 100%;">
    <form id="form1">
        <div style="padding: 5px 0;border-bottom: 1px solid #ccc; ">
            <table class="form" style="">
                <tr>
                    <th class="formTitle">零件编号</th>
                    <td class="formValue" style="width:360px;">
                        <input id="" type="text" class="form-control"  value="" />
                    </td>
                    <th class="formTitle">剪切图形</th>
                    <td class="formValue">
                        <select id="" name="" class="form-control">
                        </select>
                    </td>
                    <th class="formTitle">&nbsp;</th>
                    <td class="formValue">
                        &nbsp;
                    </td>
                    <td colspan="2">
                        <div class="btn-group" style="margin-left:30px;">
                            <a id="" class="btn btn-primary center-block" onclick="btn_show()"><span class="glyphicon glyphicon-ok"></span> 排样</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">材料牌号</th>
                    <td class="formValue">
                        <input id="" name="" type="text" class="form-control required" />
                    </td>
                    <th class="formTitle">毛坯类型</th>
                    <td class="formValue">
                        <select id="" name="" class="form-control"></select>
                    </td>
                    <th class="formTitle">毛胚尺寸</th>
                    <td class="formValue">
                        <input id="" name="" type="text" class="form-control required" />
                    </td>
                    <td colspan="2">
                        <div class="btn-group" style="margin-left:30px;">
                            <a id="" class="btn btn-primary center-block" onclick="btn_show()"><span class="glyphicon glyphicon-ok"></span> 图样</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">材料规格</th>
                    <td class="formValue input-width-40">
                        <input id="" name="" type="text" class="form-control text-right" /><label class="suffix" style="font-size:18px;">&times;</label>
                        <input id="" name="" type="text" class="form-control text-right" /><label class="suffix" style="font-size:18px;">&times;</label>
                        <input id="" name="" type="text" class="form-control text-right" />
                    </td>
                    <th class="formTitle">剪切规格</th>
                    <td class="formValue input-width-40">
                        <input id="" name="" type="text" class="form-control text-right" /><label class="suffix" style="font-size:18px;">&times;</label>
                        <input id="" name="" type="text" class="form-control text-right" />
                    </td>
                    <th class="formTitle">&nbsp;</th>
                    <td class="formValue">
                        &nbsp;
                    </td>
                    <td colspan="2">
                        <div class="btn-group" style="margin-left:30px;">
                            <a id="" class="btn btn-primary center-block" onclick="btn_ok()"><span class="glyphicon glyphicon-ok"></span> 确认</a>
                        </div>
                    </td>
                </tr>
                <tr>
                    <th class="formTitle">一张板切</th>
                    <td class="formValue">
                        <input id="" name="" type="text" class="form-control text-right" style="width:60px;" /><label class="suffix">块</label>
                    </td>
                    <th class="formTitle">一块切</th>
                    <td class="formValue">
                        <input id="" name="" type="text" class="form-control text-right" style="width:60px;" /><label class="suffix">个零件</label>
                    </td>
                    <th class="formTitle">一张切</th>
                    <td class="formValue">
                        <input id="" name="" type="text" class="form-control text-right" style="width:60px;" /><label class="suffix">个零件</label>
                    </td>
                    <td colspan="2">
                        <div class="btn-group" style="margin-left:30px;">
                            <a id="" class="btn btn-primary center-block" onclick="btn_cancel()"><span class="glyphicon glyphicon-remove"></span> 返回</a>
                        </div>
                    </td>
                </tr>
            </table>
        </div>
        <div style="padding: 5px 0; padding-left:15px; border-bottom:1px solid #ccc;" class="line-table input-width-140">
            <label class="prefix">零件</label> <input id="" name="" placeholder="零件编号/零件名称" type="text" class="form-control required" /> &nbsp;
            <div class="btn-group" style="margin-top:-1px;">
                <a id="" class="btn btn-primary center-block" onclick=""><span class="glyphicon glyphicon-search"></span> 检索</a>
            </div>
        </div>
    </form>
    <div style="">
        <table id="gridList"></table>
        <div id="gridPager"></div>
    </div>
</div>

